home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 1996 May / cd joy 71No13.iso / pc / demos / eurosoc / source / euro_usr.cpp < prev    next >
C/C++ Source or Header  |  1996-03-19  |  35KB  |  1,193 lines

  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include <conio.h>
  5.  
  6. #include "eurodefs.h"
  7. #include "euro_fxd.h"
  8. #include "euro.equ"
  9. #include "euro_sym.h"
  10. #include "euro_def.h"
  11. #include "euro_var.h"
  12. #include "euro_cnt.h"
  13. #include "euro_grf.h"
  14. #include "euro_gen.h"
  15. #include "euro_net.h"
  16. #include "euro_int.h"
  17.  
  18. #include "defines.h"
  19.  
  20.  
  21. char    LegaliseUserCntrlSelection( char, signed char );
  22. char    LegaliseUserPlyrSelection( char, char);
  23. void    DisplayNETinfo();
  24. void    BuildNETuserTable();
  25. void    DisplayUserTags( char, short, char );
  26.  
  27. //********************************************************************************************************************************
  28.  
  29. char    FindNumberOfMatchUsers()
  30.     {
  31.         char    users     =     0;
  32.  
  33.         for (char u=0; u<EUROnoOfMatchPlyrs; u++)
  34.         {        
  35.             if ( UserList[u].team == EUROteamA || UserList[u].team == EUROteamB )
  36.                 users++;
  37.         }
  38.         return(users);
  39.     }
  40.  
  41. //********************************************************************************************************************************
  42.  
  43. void    DisplayUserPanels( char gametype )
  44.     {
  45.         if ( gametype != EURO_championship )
  46.         {        
  47.             DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  48.                    SMLL_GOTH+EUROteamA, 192, 240, NO_BOX, spritecopy );      
  49.  
  50.             DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  51.                    PSBX_PANL, 278, 232, NO_BOX, spritecopy );      
  52.             svalue    =    16;
  53.             pmin    =    16;
  54.             pmax    =    32;
  55.             DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  56.                    SMLL_GOTH+EUROteamB, 456, 240, NO_BOX, spriteareainccopy );      
  57.         }
  58.  
  59.         else
  60.  
  61.         {        
  62.             EUROchampTeam    =     UserList[EUROplyrSetup].team;
  63.  
  64.             DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  65.                    PLRG_GSHD, 337, 238, NO_BOX, spritecopy );      
  66.             DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  67.                    PLRG_GOTH+EUROchampTeam, 333, 234, NO_BOX, spritecopy );      
  68.         }
  69.  
  70.     }
  71.  
  72. //********************************************************************************************************************************
  73.  
  74. void    InitNetUserSelection()
  75.     {
  76.         if ( ( EUROgameType == EURO_network_game || EUROgameType == EURO_wireplay ) 
  77.             && EUROoveride == 0 ) 
  78.                 UserList[0].player    =    PLYR_NOT_CHOSEN;
  79.     }
  80.  
  81. //********************************************************************************************************************************
  82.  
  83. void    ResetUsers()
  84.     {
  85.           for ( char u=0; u < 16; u ++ )
  86.         {
  87.             UserList[u].team       =    0;
  88.             UserList[u].player     =    AUTOPLAYER;
  89.             UserList[u].control    =     -1;
  90.         }
  91.     }
  92.  
  93. //********************************************************************************************************************************
  94.  
  95. void    ClearNetUserList()
  96.     {
  97.           for ( char u=0; u < 24; u ++ )
  98.         { UserNetList[u] = 0; }
  99.           UserNetList[0]    = 1; 
  100.           UserNetList[12]    = 1;
  101.     }
  102.  
  103. //********************************************************************************************************************************
  104.  
  105. void    DisplayUserSetupButtons( signed char n )
  106.     {
  107.         OVERRIDEpal1        =    48;
  108.         OVERRIDEpal2        =    62;
  109.  
  110.         if ( EUROgameType == EURO_friendly || EUROgameType == EURO_championship )
  111.         {
  112.              TeamSelectHandle=     AddAnimation( 516, 434, 
  113.                   ( (float)BUTN_BLUE ), ( (float)BUTN_WHBL+11.9 ),
  114.                  0.0, TEAM_SELECT_BOX, CONT_ANIM );
  115.             TeamSelectHighlight =  ControlOptionHighlight( -1, TEAM_SELECT_BOX,
  116.                  TEAM_SELECTdisp_BOX, -1, 
  117.                   TeamSelectHandle, BUTN_LBLS+Done );
  118.         }
  119.  
  120.  
  121.         if ( EUROgameType == EURO_network_game || EUROgameType == EURO_wireplay )
  122.                 //&& n == PLYR_NOT_CHOSEN && UserList[0].player != PLYR_NOT_CHOSEN )
  123.         {
  124.              NetStartHandle       =  AddAnimation( 516, 300, 
  125.                           ( (float)BUTN_BLUE ), ( (float)BUTN_WHBL+11.9 ),
  126.                          0.0, NET_START_BOX, RUN_ONCE );
  127.             NetStartHighlight =  ControlOptionHighlight( -1, NET_START_BOX,
  128.                           NET_STARTdisp_BOX, -1, NetStartHandle, BUTN_LBLS+Done );
  129.         }
  130.     }
  131.  
  132. //********************************************************************************************************************************
  133.  
  134. void    TranslateUserSelections()
  135.     {
  136.         char    plyr;
  137.  
  138.         if ( EUROgameType != EURO_championship )
  139.         {
  140.  
  141.               for ( char u=0; u < 16; u ++ )
  142.              {
  143.                 if ( UserList[u].TeamHAflag == 0 )
  144.                     UserList[u].team =    EUROteamA;
  145.                 else
  146.                     UserList[u].team =    EUROteamB;
  147.             }
  148.  
  149.         }
  150.  
  151.               for ( char p=0; p < EUROmaxPlayers; p ++ )
  152.             {
  153.                 plyr    =    AUTOPLAYER;
  154.  
  155.                   for ( char s=0; s < 11; s ++ )
  156.                 {
  157.                     if ( (SquadInfo[ (UserList[p].team*20)+s]) == UserList[p].player )    
  158.                         plyr    =    UserList[p].player;
  159.                 }
  160.  
  161.             UserList[p].player    =    plyr;
  162.             }            
  163.     }
  164.  
  165.  
  166. //********************************************************************************************************************************
  167.  
  168. char    GetAutoPlayers( char Team )
  169.     {
  170.         char    autos    =    0;
  171.  
  172.          for ( char p=0; p < EUROmaxPlayers; p ++ )
  173.         {
  174.             if    ( UserList[p].team == Team &&
  175.                 UserList[p].player == AUTOPLAYER )
  176.                     autos++;        
  177.         }        
  178.  
  179.     return(autos);
  180.  
  181.     }
  182.  
  183. //********************************************************************************************************************************
  184.  
  185. void    DisplayMatchTeam( char Team, short Xposn, char box_offset, int pal, char NoPlyrs )
  186.     {
  187.         int    PAL;
  188.         char    plyr;
  189.         
  190.           for ( char s=0; s < 11; s ++ )
  191.         {
  192.             plyr    =    SquadInfo[ (Team*20)+s ];
  193.                         
  194.             PAL    =    48;
  195.             
  196.               for ( char p=0; p < NoPlyrs; p ++ )
  197.             {
  198.                 if ( UserList[p].team == Team && 
  199.                      UserList[p].player == plyr )
  200.                 {
  201.  
  202.                     if    ( UserList[ EUROplyrSetup ].team == Team &&
  203.                             UserList[EUROplyrSetup].player == plyr )
  204.                             PAL    =    62;
  205.             
  206.                     else            
  207.                     
  208.                     {    
  209.                         DisplayString( (Xposn-42)-(PixelLengthOfString( GetTEXT( UTAG_LBLS+p ), SMALL_FONT) ) /2, 
  210.                              (242+( s * 18)), ( GetTEXT ( UTAG_LBLS+p )) , 
  211.                              SMALL_FONT, 55, NO_BOX, &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  212.                             PAL    =    55;
  213.                           }
  214.                 }
  215.             }
  216.  
  217.                 if ( UserNetList[s+box_offset]!=0 &&
  218.                     ( UserList[ 0 ].team != Team || UserList[0].player != plyr ))
  219.                         PAL = 55;
  220.  
  221.             DisplayString( (Xposn-17)-(PixelLengthOfString( GetTEXT( SQUD_NMBS+plyr ) ,SMALL_FONT) ) /2, 
  222.                      (242+(s*18)), ( GetTEXT ( SQUD_NMBS + plyr )) , 
  223.                      SMALL_FONT, pal+8, s, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  224.  
  225.             DisplayString( Xposn,(242+(s*18)), 
  226.                      ( GetPLAYERSname( plyr, Team, INITIAL_SURNAME )) , 
  227.                     SMALL_FONT, PAL, s+box_offset, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  228.         }
  229.  
  230.         if    ( UserList[ EUROplyrSetup ].team == Team &&
  231.                 UserList[EUROplyrSetup].player == AUTOPLAYER )
  232.                 PAL    =    62;
  233.         else    
  234.                 PAL    =    48;
  235.             
  236.         DisplayString( Xposn,(242+(s*18)), 
  237.                  ( GetTEXT( AUTO_LBLE)),    //AUTO_SYMB )) , 
  238.                 SMALL_FONT, PAL, box_offset+11, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  239.     }
  240.  
  241. //********************************************************************************************************************************
  242.  
  243. void    DisplayUserHeadings(char user)
  244.     {
  245.         if ( EUROgameType == EURO_friendly || 
  246.             EUROgameType == EURO_championship)
  247.             {        
  248.                 DisplayString( 12, 98,
  249.                     GetTEXT ( PLYR_LBLS+user ),
  250.                     LARGE_FONT, 175, NO_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  251.                   AddToDumpList( 12, 98, 
  252.                     PixelLengthOfString( GetTEXT( PLYR_LBLS+user ), LARGE_FONT), 34 );
  253.             }
  254.  
  255.         else
  256.  
  257.             {        
  258.                 DisplayString( 12, 98,
  259.                     GetTEXT ( PSET_HEAD+(EUROgameType-2) ),
  260.                     LARGE_FONT, 175, NO_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  261.                   AddToDumpList( 12, 98, 
  262.                     PixelLengthOfString( GetTEXT ( PSET_HEAD+(EUROgameType-2)), LARGE_FONT), 34 );
  263.             }
  264.  
  265.     }
  266.  
  267. //********************************************************************************************************************************
  268.  
  269. void    DisplayUserLabels(char user)
  270.     {
  271.  
  272.         DisplayString( 37, 173,
  273.             GetTEXT ( USEL_LBLS+Country ),
  274.             SMALL_FONT, 55, PLYR_COUNTRY_BOX, &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  275.         DisplayString( 37, 195,
  276.             GetTEXT ( USEL_LBLS+Cntrl ),
  277.             SMALL_FONT, 55, PLYR_CNTRL_BOX, &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  278.  
  279.  
  280.     // >>> Friendly match user option panel <<<
  281.  
  282.  
  283.         if ( EUROgameType == EURO_friendly )
  284.         {
  285.             if ( EUROnoOfMatchPlyrs > 1 )
  286.             {
  287.                 Image_Heights[UBAR_PANL+Top] =     PlrSetupPanelHght[ EUROnoOfMatchPlyrs ];
  288.  
  289.                   DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  290.                       UBAR_PANL+Top, 277, 131, NO_BOX, spritecopy );      
  291.                   DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  292.                       UBAR_PANL+Btm, 277, 131+(Image_Heights[UBAR_PANL+Top]), NO_BOX, spritecopy );      
  293.  
  294.                 char    c = 0;
  295.  
  296.                   for ( char p=0; p < EUROnoOfMatchPlyrs; p ++ )
  297.                 {
  298.                     UserSetupList[p]    =    -1;
  299.  
  300.                     if ( p!=user )
  301.                     {                    
  302.                         DisplayString( 406-(PixelLengthOfString( GetTEXT( PSET_LBLS+p ), SMALL_FONT) ) /2,
  303.                             (131+19)+(c*23), 
  304.                                  ( GetTEXT( PSET_LBLS+p )) , 
  305.                             SMALL_FONT, 62, USER_SETUP_BOX+c, &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  306.                         UserSetupList[c] =    p;
  307.                               c++;
  308.                     }
  309.                 }
  310.             }
  311.         }        
  312.  
  313.  
  314.     // >>> Championship match user option panel <<<
  315.  
  316.         if ( EUROgameType == EURO_championship )
  317.         {
  318.             printf("EUROmatchUsers = %d\n", EUROmatchUsers);
  319.             
  320.  
  321.             if (  EUROmatchUsers > 1 )
  322.             {
  323.                 Image_Heights[UBAR_PANL+Top] =     PlrSetupPanelHght[ EUROmatchUsers ];
  324.  
  325.                   DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  326.                       UBAR_PANL+Top, 277, 131, NO_BOX, spritecopy );      
  327.                   DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  328.                       UBAR_PANL+Btm, 277, 131+(Image_Heights[UBAR_PANL+Top]), NO_BOX, spritecopy );      
  329.  
  330.                 char    c = 0;
  331.  
  332.                   for ( char p=0; p < EUROnoOfMatchPlyrs; p ++ )
  333.                 {
  334.                     UserSetupList[p]    =    -1;
  335.  
  336.                     if ( p!=user && 
  337.                         ( UserList[ p ].team == EUROteamA ||
  338.                             UserList[ p ].team == EUROteamB) )
  339.                     {                    
  340.                         DisplayString( 406-(PixelLengthOfString( GetTEXT( PSET_LBLS+p ), SMALL_FONT) ) /2,
  341.                             (131+19)+(c*23), 
  342.                                  ( GetTEXT( PSET_LBLS+p )) , 
  343.                             SMALL_FONT, 62, USER_SETUP_BOX+c, &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  344.                         UserSetupList[c] =    p;
  345.                               c++;
  346.                     }
  347.                 }
  348.             }
  349.         }        
  350.  
  351.     // >>> Network game match user option panel <<<
  352.  
  353.  
  354.         if ( EUROgameType == EURO_network_game || EUROgameType == EURO_wireplay)
  355.         {
  356.             Image_Heights[UBAR_PANL+Top] =     56;
  357.               DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  358.                   UBAR_PANL+Top, 277, 131, NO_BOX, spritecopy );      
  359.               DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  360.                   UBAR_PANL+Btm, 277, 131+(Image_Heights[ UBAR_PANL+Top ]), NO_BOX, spritecopy );      
  361.         }
  362.  
  363.  
  364.  
  365.  
  366.     }
  367.  
  368. //********************************************************************************************************************************
  369.  
  370. void    DisplayUserInfo(char user)
  371.     {
  372.  
  373.     CopyFromBACKtoPSEUDObuffer(
  374.         &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
  375.         12, 130, 240, 82 );
  376.  
  377.     // *** PLAYERS NAME ***
  378.  
  379.         if ( UserList[user].player == AUTOPLAYER )
  380.  
  381.             DisplayString( 40, 144,
  382.                  ( GetTEXT( AUTO_LBLE )), 
  383.                 MEDIUM_FONT, 48, NO_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  384.         else
  385.  
  386.         if ( UserList[user].player == PLYR_NOT_CHOSEN )
  387.  
  388.             DisplayString( 40, 144,
  389.                  ( GetTEXT( SPCT_LBLS+Watch )), 
  390.                 MEDIUM_FONT, 48, NO_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  391.         else
  392.  
  393.             DisplayString( 40, 144,
  394.                  ( GetPLAYERSname( UserList[user].player, UserList[user].team, FULL_NAME )) , 
  395.                 MEDIUM_FONT, 48, NO_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  396.  
  397.     // *** PLAYERS COUNTRY ***
  398.  
  399.         int    PAL;
  400.  
  401.         if    ( UserList[user].team == EUROteamA )
  402.             PAL    =    16+8;
  403.         else
  404.             PAL    =    32+8;
  405.         
  406.         if ( UserList[user].player == PLYR_NOT_CHOSEN )
  407.         
  408.         DisplayString( 104,173, ToUPPER(GetTEXT( SPCT_LBLS+Watch )), SMALL_FONT, 
  409.                    48, PLYR_COUNTRY_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  410.         else
  411.  
  412.         DisplayString( 104,173, GetTEAMname( UserList[user].team, 11 ), SMALL_FONT, 
  413.                    PAL, PLYR_COUNTRY_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  414.  
  415.     // *** PLAYERS CONTROL METHOD ***
  416.         
  417.         if ( UserList[user].player == PLYR_NOT_CHOSEN )
  418.  
  419.         DisplayString( 104,195, ToUPPER(GetTEXT( SPCT_LBLS+Nocntrl )), SMALL_FONT, 
  420.                    62, PLYR_CNTRL_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  421.         else
  422.  
  423.         DisplayString( 104,195, GetTEXT( CNTL_LBLS+UserList[user].control), SMALL_FONT, 
  424.                    62, PLYR_CNTRL_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  425.  
  426.         AddToDumpList( 12, 130, 240, 82 );
  427.     }
  428.  
  429. //********************************************************************************************************************************
  430.  
  431. void    DoUserSetup( char MENU, signed char BOX )
  432.     {
  433.         if ( MENU == PLAYER_SETUP && LogicState == RUN_FRONTEND)
  434.         {
  435.  
  436.         OVERRIDEpal1        =    48;
  437.         OVERRIDEpal2        =    62;
  438.  
  439.     //------- EURO FRIENDLY GAME USER SELECTION -----------------------------------------------------
  440.  
  441.             if ( EUROgameType == EURO_friendly )
  442.             {
  443.                 TeamSelectHighlight =  ControlOptionHighlight( BOX, TEAM_SELECT_BOX,
  444.                                TEAM_SELECTdisp_BOX, TeamSelectHighlight, 
  445.                                TeamSelectHandle, BUTN_LBLS+Done );
  446.  
  447.                 ClearNetUserList();
  448.  
  449.                 if ( BOX == TEAM_SELECT_BOX
  450.                     && ButtonState != 0 )
  451.                   {
  452.                     Animation_table[TeamSelectHandle].AnimationSpeed = 
  453.                         WhichButton( ButtonState, 0.85);
  454.  
  455.                     ChangeMenu    =    TEAM_SELECT;
  456.  
  457.                          DeBounce      =     TRUE;
  458.                   }                                     
  459.              
  460.                 if ( BOX == PLYR_CNTRL_BOX && ButtonState != 0 )
  461.                   {
  462.                     if ( ButtonState == LEFT_BUTTON )
  463.                         UserList[EUROplyrSetup].control    = 
  464.                             LegaliseUserCntrlSelection( UserList[EUROplyrSetup].control, -1 );
  465.  
  466.                     if ( ButtonState == RIGHT_BUTTON )
  467.                         UserList[EUROplyrSetup].control    = 
  468.                             LegaliseUserCntrlSelection( UserList[EUROplyrSetup].control, 1 );
  469.     
  470.                     DisplayUserInfo(EUROplyrSetup);
  471.                          DeBounce      =     TRUE;
  472.                   }                                     
  473.  
  474.                 if ( BOX == PLYR_COUNTRY_BOX && ButtonState != 0 )
  475.                   {
  476.                     if ( UserList[EUROplyrSetup].team == EUROteamA )
  477.                         UserList[EUROplyrSetup].team = EUROteamB;
  478.                     else
  479.                         UserList[EUROplyrSetup].team = EUROteamA;
  480.  
  481.                     UserList[EUROplyrSetup].player = AUTOPLAYER;
  482.                     DisplayUserInfo(EUROplyrSetup);
  483.  
  484.                     DisplayMatchTeam( EUROteamA, 87,  0,  16, EUROmaxPlayers );
  485.                     DisplayMatchTeam( EUROteamB, 352, 12, 32, EUROmaxPlayers );
  486.                     AddToDumpList( 82, 241, 146, 216 );
  487.                     AddToDumpList( 347,241, 146, 216 );
  488.                     DisplayUserTags( EUROteamA, 87,  0 );
  489.                     DisplayUserTags( EUROteamB, 352, 12 );
  490.                          DeBounce      =     TRUE;
  491.                   }                                     
  492.  
  493.                 if ( BOX > 0 && BOX<24 && ButtonState != 0 )
  494.                  {
  495.                      if ( BOX < 11 && ( LegaliseUserPlyrSelection(SquadInfo[ (EUROteamA*20)+BOX ], EUROteamA) == Usable) )
  496.                      {
  497.                         UserList[EUROplyrSetup].team     = EUROteamA;
  498.                         UserList[EUROplyrSetup].player  = SquadInfo[ (EUROteamA*20)+BOX ];    //BOX;
  499.                         UserList[EUROplyrSetup].TeamHAflag = 0;
  500.                         DisplayUserTags( EUROteamA, 87,  0 );
  501.                         DisplayUserTags( EUROteamB, 352, 12 );
  502.                      }                    
  503.  
  504.                     else
  505.  
  506.                      if ( BOX == 11 )
  507.                      {
  508.                         UserList[EUROplyrSetup].team     = EUROteamA;
  509.                         UserList[EUROplyrSetup].player  = AUTOPLAYER;
  510.                         UserList[EUROplyrSetup].TeamHAflag = 0;
  511.                         DisplayUserTags( EUROteamA, 87,  0 );
  512.                         DisplayUserTags( EUROteamB, 352, 12 );
  513.                      }                    
  514.  
  515.                     else
  516.                    
  517.                      if ( BOX > 12 && BOX < 23 && ( LegaliseUserPlyrSelection( SquadInfo[ (EUROteamB*20)+(BOX-12) ], EUROteamB) == Usable) )
  518.                      {
  519.                         UserList[EUROplyrSetup].team     = EUROteamB;
  520.                         UserList[EUROplyrSetup].player  = SquadInfo[ (EUROteamB*20)+(BOX-12) ];    //BOX-12;
  521.                         UserList[EUROplyrSetup].TeamHAflag = 1;
  522.                         DisplayUserTags( EUROteamA, 87,  0 );
  523.                         DisplayUserTags( EUROteamB, 352, 12 );
  524.                      }                    
  525.  
  526.                     else
  527.  
  528.                      if ( BOX == 23 )
  529.                      {
  530.                         UserList[EUROplyrSetup].team     = EUROteamB;
  531.                         UserList[EUROplyrSetup].player  = AUTOPLAYER;
  532.                         UserList[EUROplyrSetup].TeamHAflag = 1;
  533.                         DisplayUserTags( EUROteamA, 87,  0 );
  534.                         DisplayUserTags( EUROteamB, 352, 12 );
  535.                      }                    
  536.  
  537.                     DisplayMatchTeam( EUROteamA, 87,  0,  16, EUROmaxPlayers );
  538.                     DisplayMatchTeam( EUROteamB, 352, 12, 32, EUROmaxPlayers );
  539.                     DisplayUserInfo(EUROplyrSetup);
  540.  
  541.                     AddToDumpList( 82, 241, 146, 216 );
  542.                     AddToDumpList( 347,241, 146, 216 );
  543.  
  544.                          DeBounce      =     TRUE;
  545.                  }
  546.  
  547.     
  548.                 CopyFromBACKtoPSEUDObuffer(
  549.                     &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
  550.                     277, 150,
  551.                     Image_Widths[ UBAR_PANL+Top ]-32,
  552.                     Image_Heights[ UBAR_PANL+Top ]-18);
  553.                 AddToDumpList( 277, 150,
  554.                     Image_Widths[ UBAR_PANL+Top ]-32,
  555.                     Image_Heights[ UBAR_PANL+Top ]-18);
  556.  
  557.                 if ( BOX >= USER_SETUP_BOX && BOX < (USER_SETUP_BOX+3))
  558.                  {                   
  559.                     char    c    =    BOX-USER_SETUP_BOX;
  560.  
  561.                     if ( UserSetupList[c] >= 0 )
  562.                          DisplayString( 406-(PixelLengthOfString( 
  563.                             GetTEXT( PSET_LBLS+UserSetupList[c] ), 
  564.                             SMALL_FONT) ) /2,
  565.                              (131+19)+(c*23), 
  566.                                   ( GetTEXT( PSET_LBLS+UserSetupList[c])) , 
  567.                              SMALL_FONT, 48, USER_SETUP_BOX+c, 
  568.                             &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  569.  
  570.                        if ( ButtonState != 0 )
  571.                          {    
  572.                                   ChangeMenu    =    PLAYER_SETUP;
  573.                            EUROplyrSetup    =    UserSetupList[BOX-USER_SETUP_BOX];
  574.                                 DeBounce      =     TRUE;
  575.                            } 
  576.  
  577.                      }
  578.             }
  579.  
  580.  
  581.  
  582.     //------- NETWORK USER SELECTION --------------------------------------------------------------------
  583.  
  584.  
  585.             if ( EUROgameType == EURO_network_game || EUROgameType == EURO_wireplay )
  586.             {
  587.                 signed char n;
  588.                 n = UserList[0].player;
  589.  
  590.  
  591.                 if ( TeamOveride )
  592.                 {
  593.                     ChangeMenu    =    PLAYER_SETUP;
  594.                     EUROoveride    =    1;
  595.                     TeamOveride    =    0;
  596.                     EUROteamA    =    Team_A;        // Setup other users choice of teams.
  597.                     EUROteamB    =    Team_B;        // Setup other users choice of teams.
  598.                 }
  599.  
  600.                      if ( BOX == NET_START_BOX
  601.                     && EURO_NetSelectionMade == No
  602.                     && UserList[0].player != PLYR_NOT_CHOSEN
  603.                     && ButtonState != 0 )
  604.                 {
  605.                       CopyFromBACKtoPSEUDObuffer(
  606.                           &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
  607.                           12, 98,
  608.                         PixelLengthOfString( GetTEXT ( PSET_HEAD+(EUROgameType-2)), LARGE_FONT), 34 );
  609.  
  610.                     if ( EUROgameType == EURO_network_game )
  611.                     {
  612.                           DisplayString( 12, 98, GetTEXT ( NWRK_LBLS+Netwait ),
  613.                               LARGE_FONT, 175, NO_BOX, 
  614.                               &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  615.                           AddToDumpList( 12, 98, 
  616.                             PixelLengthOfString( GetTEXT( NWRK_LBLS+Netwait ), LARGE_FONT),    34 );
  617.                     }
  618.  
  619.                      else
  620.  
  621.                     if ( EUROgameType == EURO_wireplay )
  622.                     {
  623.                           DisplayString( 12, 98, GetTEXT ( WIRE_LBLS+Wirewait ),
  624.                               LARGE_FONT, 175, NO_BOX, 
  625.                               &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  626.                           AddToDumpList( 12, 98, 
  627.                             PixelLengthOfString( GetTEXT( NWRK_LBLS+Netwait ), LARGE_FONT),    34 );
  628.                     }
  629.  
  630.                           EURO_NetSelectionMade    =    Yes;
  631.                           Animation_table[NetStartHandle].AnimationSpeed = 0.85;
  632.                                    DeBounce      =     TRUE;
  633.                     
  634.  
  635.                 // run this section - ignores CD test and accepts your player choice...
  636.  
  637.                     if    (TeamChoice < 2)
  638.                     {
  639.                         TeamChoice+=2;
  640.                         SendPlayerInfo();
  641.                         TickPause();
  642.                         TickPause();
  643.                         TickPause();
  644.                     }
  645.     
  646. //                // the following line was run if a CD was not found instead of the above...
  647. //                        SendNETTeamInfo();    
  648.                     } 
  649.  
  650.  
  651.  
  652.  
  653.                 if ( BOX == PLYR_CNTRL_BOX && 
  654.                      UserList[0].player != PLYR_NOT_CHOSEN &&
  655.                         ButtonState != 0 )
  656.                   {
  657.                     if ( ButtonState == LEFT_BUTTON )
  658.                         UserList[0].control    = 
  659.                             LegaliseUserCntrlSelection( UserList[0].control, -1 );
  660.  
  661.                     if ( ButtonState == RIGHT_BUTTON )
  662.                         UserList[0].control    = 
  663.                             LegaliseUserCntrlSelection( UserList[0].control, 1 );
  664.     
  665.                     DisplayUserInfo(EUROplyrSetup);
  666.                          DeBounce      =     TRUE;
  667.                   }                                     
  668.  
  669.  
  670.  
  671.                 if ( BOX>0 && BOX<24 && ButtonState != 0 && EURO_NetSelectionMade == No )
  672.                 {
  673.                      if ( BOX > 0 && BOX < 11 )    //&& ( LegaliseUserPlyrSelection(SquadInfo[ (EUROteamA*20)+BOX ], EUROteamA) == Usable) )
  674.                      {
  675.                         UserList[0].team        =     EUROteamA;
  676.                         UserList[0].player      =     SquadInfo[ (EUROteamA*20)+BOX ];    //BOX;
  677.                         TeamChoice        =    0;
  678.                         PlayerChoice        =    BOX+1;    // because 0 is autoplayer in actua
  679.                         UserList[0].TeamHAflag     =     0;
  680.                         SendPlayerInfo();
  681.                         TickPause();
  682.                         TickPause();
  683.                         TickPause();
  684.                         DisplayUserTags( EUROteamA, 87,  0 );
  685.                         DisplayUserTags( EUROteamB, 352, 12 );
  686.                      }                    
  687.  
  688.                      else
  689.                  
  690.                      if ( BOX == 11 && TeamA_AUTOplayers < 2 )
  691.                       {
  692.                          UserList[0].team       =     EUROteamA;
  693.                          UserList[0].player     =     AUTOPLAYER;
  694.                          TeamChoice        =    0;
  695.                          PlayerChoice        =    1;
  696.                          UserList[0].TeamHAflag     =     0;
  697.                          SendPlayerInfo();
  698.                         TickPause();
  699.                         TickPause();
  700.                          TickPause();
  701.                          DisplayUserTags( EUROteamA, 87,  0 );
  702.                          DisplayUserTags( EUROteamB, 352, 12 );
  703.                       }                    
  704.                  
  705.                      else
  706.                         
  707.                      if ( BOX > 12 && BOX < 23 )  //&& ( LegaliseUserPlyrSelection( SquadInfo[ (EUROteamB*20)+(BOX-12) ], EUROteamB) == Usable) )
  708.                       {
  709.                          UserList[0].team        =     EUROteamB;
  710.                          UserList[0].player      =     SquadInfo[ (EUROteamB*20)+(BOX-12) ]; 
  711.                          TeamChoice        =    1;
  712.                          PlayerChoice        =    BOX-10;
  713.                          UserList[0].TeamHAflag     =     1;
  714.                          SendPlayerInfo();
  715.                         TickPause();
  716.                         TickPause();
  717.                          TickPause();
  718.                          DisplayUserTags( EUROteamA, 87,  0 );
  719.                          DisplayUserTags( EUROteamB, 352, 12 );
  720.                       }                    
  721.                  
  722.                      else
  723.                  
  724.                      if ( BOX == 23 && TeamB_AUTOplayers < 2 )
  725.                       {
  726.                          UserList[0].team        =     EUROteamB;
  727.                          UserList[0].player      =     AUTOPLAYER;
  728.                          TeamChoice        =    1;
  729.                          PlayerChoice        =    1;
  730.                          UserList[0].TeamHAflag     =     1;
  731.                          SendPlayerInfo();
  732.                         TickPause();
  733.                         TickPause();
  734.                          TickPause();
  735.                          DisplayUserTags( EUROteamA, 87,  0 );
  736.                          DisplayUserTags( EUROteamB, 352, 12 );
  737.                       }                    
  738.  
  739.                     DisplayUserInfo(0);
  740.                          DeBounce      =     TRUE;
  741.                 }
  742.                 
  743.                 if ( EURO_NetSelectionMade == Yes )
  744.                 {
  745.                     char    Starts    =    0;
  746.                     for ( int i=0; i < network_on; i++ )
  747.                     {if (NetTeams[i] >= 2) Starts++;}
  748.  
  749.                     if    (Starts==network_on && network_on>1)            
  750.                     {
  751.                         End_Net_Init();
  752.                         EuroNETseed = 12345;
  753.                         for ( i=0; i<network_on; i++ )
  754.                             NetTeams[i]-=2;
  755.                         RunMatch     =    Yes;
  756.                         //ChangeMenu    =    NEXT_MATCH;    //GROUP_FIXTURES;
  757.                         ChangeMenu    =    MAIN;
  758.                     }
  759.                 }
  760.  
  761.                 NetStartHighlight =  ControlOptionHighlight( BOX, NET_START_BOX,
  762.                                   NET_STARTdisp_BOX, NetStartHighlight, 
  763.                             NetStartHandle, BUTN_LBLS+Done );
  764.                 BuildNETuserTable();
  765.                 DisplayMatchTeam( EUROteamA, 87,  0,  16, EUROmaxPlayers );
  766.                 DisplayMatchTeam( EUROteamB, 352, 12, 32, EUROmaxPlayers );
  767.                 AddToDumpList( 82, 241, 146, 216 );
  768.                 AddToDumpList( 347,241, 146, 216 );
  769.  
  770.                 if ( EUROgameType== EURO_network_game || EUROgameType == EURO_wireplay)
  771.                     DisplayNETinfo();
  772.  
  773.                 if ( keys[1] )    // escape key pressed during selection
  774.                 {
  775.                     Initial_Quit();                                            
  776.                     ChangeMenu    = MAIN;
  777.                 }
  778.             }
  779.  
  780.     //------- EURO CHAMPIONSHIP USER SELECTION --------------------------------------------------------------------
  781.  
  782.             if ( EUROgameType == EURO_championship )
  783.             {
  784.                 ClearNetUserList();
  785.  
  786.                 TeamSelectHighlight =  ControlOptionHighlight( BOX, TEAM_SELECT_BOX,
  787.                                TEAM_SELECTdisp_BOX, TeamSelectHighlight, 
  788.                                TeamSelectHandle, BUTN_LBLS+Done );
  789.  
  790.                 if ( BOX == PLYR_CNTRL_BOX && ButtonState != 0 )
  791.                   {
  792.                     if ( ButtonState == LEFT_BUTTON )
  793.                         UserList[EUROplyrSetup].control    = 
  794.                             LegaliseUserCntrlSelection( UserList[EUROplyrSetup].control, -1 );
  795.  
  796.                     if ( ButtonState == RIGHT_BUTTON )
  797.                         UserList[EUROplyrSetup].control    = 
  798.                             LegaliseUserCntrlSelection( UserList[EUROplyrSetup].control, 1 );
  799.     
  800.                     DisplayUserInfo(EUROplyrSetup);
  801.                          DeBounce      =     TRUE;
  802.                   }                                     
  803.  
  804.                 if ( BOX == TEAM_SELECT_BOX
  805.                     && ButtonState != 0 )
  806.                   {
  807.                     Animation_table[TeamSelectHandle].AnimationSpeed =
  808.                         WhichButton( ButtonState, 0.85);
  809.                     ChangeMenu    =    NEXT_MATCH;
  810.                          DeBounce      =     TRUE;
  811.                   }                                     
  812.              
  813.                 if ( BOX > 0 && BOX<12 && ButtonState != 0 )
  814.                  {
  815.                      if ( BOX < 11 && ( LegaliseUserPlyrSelection( SquadInfo[ (EUROchampTeam*20)+BOX ], EUROchampTeam) == Usable) )
  816.                      {
  817.                         UserList[EUROplyrSetup].team     = EUROchampTeam;
  818.                         UserList[EUROplyrSetup].player  = SquadInfo[ (EUROchampTeam*20)+BOX ];
  819.                         DisplayUserTags( EUROchampTeam, 87,  0 );
  820.                      }                    
  821.  
  822.                     else
  823.  
  824.                      if ( BOX == 11 )
  825.                      {
  826.                         UserList[EUROplyrSetup].team     = EUROchampTeam;
  827.                         UserList[EUROplyrSetup].player  = AUTOPLAYER;
  828.                         DisplayUserTags( EUROchampTeam, 87,  0 );
  829.                      }                    
  830.  
  831.                     DisplayMatchTeam( EUROchampTeam, 87,  0,  16, EUROnoOfMatchPlyrs );
  832.                     DisplayUserInfo(EUROplyrSetup);
  833.                     AddToDumpList( 82, 241, 146, 216 );
  834.                          DeBounce      =     TRUE;
  835.  
  836.                  }
  837.  
  838.                 CopyFromBACKtoPSEUDObuffer(
  839.                     &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
  840.                     277, 150,
  841.                     Image_Widths[ UBAR_PANL+Top ]-32,
  842.                     Image_Heights[ UBAR_PANL+Top ]-18);
  843.                 AddToDumpList( 277, 150,
  844.                     Image_Widths[ UBAR_PANL+Top ]-32,
  845.                     Image_Heights[ UBAR_PANL+Top ]-18);
  846.  
  847.                 if ( BOX >= USER_SETUP_BOX && BOX < (USER_SETUP_BOX+3))
  848.                 {                   
  849.                     char    c    =    BOX-USER_SETUP_BOX;
  850.                         if ( UserSetupList[c] >= 0 )
  851.                          DisplayString( 406-(PixelLengthOfString( 
  852.                             GetTEXT( PSET_LBLS+UserSetupList[c] ), 
  853.                             SMALL_FONT) ) /2,
  854.                              (131+19)+(c*23), 
  855.                                   ( GetTEXT( PSET_LBLS+UserSetupList[c])) , 
  856.                              SMALL_FONT, 48, USER_SETUP_BOX+c, 
  857.                             &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  858.  
  859.                            if ( ButtonState != 0 )
  860.                              {    
  861.                                       ChangeMenu    =    PLAYER_SETUP;
  862.                                EUROplyrSetup    =    UserSetupList[BOX-USER_SETUP_BOX];
  863.                                     DeBounce      =     TRUE;
  864.                                } 
  865.                     }
  866.             }
  867.  
  868.     //-----------------------------------------------------------------------------------------
  869.  
  870.             }
  871.     }
  872.  
  873. //********************************************************************************************************************************
  874.  
  875. void    BuildNETuserTable()
  876.     {
  877.         char    p;
  878.         TeamA_AUTOplayers    =    0;
  879.         TeamB_AUTOplayers    =    0;
  880.         ClearNetUserList();
  881.  
  882.         for (char i=0; i<network_on; i++)
  883.         {
  884.             if    ( NetTeams[i] != -1 )
  885.             {
  886.                 p  =  (  ( (NetTeams[i] & 1)*11)+Players[i])-1;
  887.                 
  888.                 if ( p == 0 )
  889.                     TeamA_AUTOplayers++;
  890.                 if ( p == 11 )
  891.                     TeamB_AUTOplayers++;
  892.                 if (p!=0 && p!=11)
  893.                     UserNetList[p] = 1; 
  894.  
  895.                 if ( TeamA_AUTOplayers > 1 )
  896.                     UserNetList[11]    = 1; 
  897.                        if ( TeamB_AUTOplayers > 1 )
  898.                            UserNetList[23]    = 1; 
  899.             }        
  900.         }
  901.  
  902.     }
  903.  
  904.  
  905. //********************************************************************************************************************************
  906.  
  907. void    DisplayNETinfo()
  908.     {
  909.  
  910.     char  ammount[5];
  911.     char    *string1;
  912.  
  913.         if ( EUROgameType == EURO_network_game || EUROgameType == EURO_wireplay)
  914.          {
  915.             CopyFromBACKtoPSEUDObuffer(
  916.                 &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
  917.                 277, 131, 258, 60);
  918.  
  919.             if ( EUROgameType == EURO_network_game )            
  920.                 string1  = GetTEXT( NWRK_LBLS+Netusers );
  921.             else    
  922.                 string1  = GetTEXT( WIRE_LBLS+Netusers );
  923.  
  924.             char    *number1  = itoa( network_on, ammount, 10 );
  925.             
  926.             DisplayString( 406-
  927.                 ( (PixelLengthOfString( string1, SMALL_FONT))+
  928.                 (  PixelLengthOfString( number1, SMALL_FONT)) ) /2, 150, 
  929.                 string1, SMALL_FONT, 48, NO_BOX, 
  930.                 &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  931.  
  932.             DisplayString( NextXposn, 150, 
  933.                 number1, SMALL_FONT, 48, NO_BOX, 
  934.                 &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  935.  
  936.             char    *string2    = GetTEXT( NWRK_LBLS+Tochoose );
  937.             char    *number2  = itoa( CountNumberOfNETstarts(), ammount, 10 );
  938.  
  939.             DisplayString( 406-
  940.                 ( (PixelLengthOfString( string2, SMALL_FONT))+
  941.                 (  PixelLengthOfString( number2, SMALL_FONT)) ) /2, 173, 
  942.                 string2, SMALL_FONT, 48, NO_BOX, 
  943.                 &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  944.  
  945.             DisplayString( NextXposn, 173, 
  946.                 number2, SMALL_FONT, 48, NO_BOX, 
  947.                 &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  948.  
  949.             AddToDumpList( 277, 131, 258, 60);
  950.         }    
  951.     }
  952.  
  953. //********************************************************************************************************************************
  954.  
  955. char    LegaliseUserPlyrSelection( char player, char team )
  956.     {
  957.     char    plyr      =  Usable;
  958.     char    p;
  959.  
  960.         if ( EUROgameType != EURO_championship )
  961.         {
  962.             for ( p=0; p < EUROmaxPlayers; p ++ )
  963.             {
  964.                 if ( p != EUROplyrSetup &&
  965.                     ( UserList[p].team==team && UserList[p].player == player ) )
  966.                         plyr    = Unusable;
  967.             }
  968.         }
  969.  
  970.     else
  971.  
  972.         {
  973.             for ( p=0; p < EUROnoOfMatchPlyrs; p ++ )
  974.             {
  975.                 if ( p != EUROplyrSetup &&
  976.                     ( UserList[p].team==team && UserList[p].player == player ) )
  977.                         plyr    = Unusable;
  978.             }
  979.         }
  980.              
  981.     return(plyr);
  982.  
  983.     }
  984.  
  985. //********************************************************************************************************************************
  986.  
  987. void    SetupChampionshipCntrls( char gametype)
  988.     {
  989.         if ( gametype == EURO_championship )
  990.         {
  991.  
  992.             char    CntrlList[16];
  993.             char    CntrlReset = 0;
  994.             char     FirstCntrl = 0;
  995.             char    ScndMatchUser  = 0;
  996.  
  997.             memset( &CntrlList[0], 0, 16 );
  998.  
  999.     //--------------------------------------------------------------
  1000.  
  1001.         // we must first find out if any of the devises are being used by more than one player.            
  1002.             
  1003.                for ( char p=0; p < EUROnoOfMatchPlyrs; p ++ )
  1004.              {
  1005.                 if ( (UserList[p].team == EUROteamA || 
  1006.                       UserList[p].team == EUROteamB ) &&
  1007.                     (UserList[p].control>=0 && 
  1008.                     UserList[p].control < 17)   )
  1009.                 {
  1010.                         CntrlList[ UserList[p].control ]++;
  1011.  
  1012.                     if ( CntrlList[ UserList[p].control ] > 1 )
  1013.                         CntrlReset = 1;                    
  1014.                 }
  1015.  
  1016.                 else
  1017.  
  1018.                 if ( (UserList[p].team == EUROteamA || 
  1019.                       UserList[p].team == EUROteamB ) &&
  1020.                     ( UserList[p].control == -1 || 
  1021.                       CtrlFlags[ UserList[p].control ] != Usable) )
  1022.                         CntrlReset    = 1;                    
  1023.             }                
  1024.  
  1025.     //--------------------------------------------------------------
  1026.  
  1027.         // an illegal control method (too many of the same control devise) was found so legalise other users
  1028.         // control methods.
  1029.  
  1030.             if ( CntrlReset != 0 )
  1031.             {
  1032.  
  1033.                 if (EUROverbose)
  1034.                     printf("illegal control devise.\n");
  1035.  
  1036.                 FirstCntrl    = 15;
  1037.  
  1038.                    for ( char u = 0; u < EUROnoOfMatchPlyrs; u ++ )
  1039.                 {
  1040.                     if ( UserList[u].team == EUROteamA || 
  1041.                          UserList[u].team == EUROteamB )
  1042.                     {
  1043.                         FirstCntrl =  LegaliseUserCntrlSelection( FirstCntrl, 1 );
  1044.                         UserList[u].control = FirstCntrl;
  1045.                     }
  1046.                 }
  1047.             }
  1048.     //--------------------------------------------------------------
  1049.  
  1050.         }
  1051.     }
  1052.  
  1053. //********************************************************************************************************************************
  1054.  
  1055. char    LegaliseUserCntrlSelection( char cntl, signed char dir )
  1056.     {
  1057.         char    control      =  Unusable;
  1058.         char    current_cntr =    cntl;
  1059.         
  1060.          while    ( control == Unusable )
  1061.         {
  1062.             cntl+=    dir;            
  1063.             cntl&=    15;
  1064.  
  1065.             if ( ( CtrlFlags[ cntl ] == Usable) || cntl == current_cntr )
  1066.                 control    = Usable;
  1067.  
  1068.  
  1069.                 if ( EUROgameType != EURO_championship )
  1070.                 {
  1071.                     for ( char p=0; p < EUROmaxPlayers; p ++ )
  1072.                     {
  1073.                         if ( p != EUROplyrSetup && 
  1074.                                    cntl!= current_cntr &&
  1075.                             UserList[p].control == cntl )
  1076.  
  1077.                               UserList[p].control = current_cntr;
  1078.                       }
  1079.                  }
  1080.  
  1081.                 else
  1082.  
  1083.                 {
  1084.                        for ( char p=0; p < EUROnoOfMatchPlyrs; p ++ )
  1085.                      {
  1086.                          if ( p != EUROplyrSetup && 
  1087.                             (UserList[p].team == EUROteamA || 
  1088.                              UserList[p].team == EUROteamB ) &&
  1089.                                     cntl!= current_cntr &&
  1090.                              UserList[p].control == cntl )
  1091.                           
  1092.                         UserList[p].control = current_cntr;
  1093.                        }
  1094.                 }            
  1095.         }
  1096.  
  1097.         return(cntl);        
  1098.     }
  1099.  
  1100. //********************************************************************************************************************************
  1101.  
  1102. void    DisplayUserTags( char Team, short Xposn, char box_offset )
  1103.     {
  1104.         char    plyr;
  1105.         short    x    = Xposn+PixelLengthOfString(GetTEXT( AUTO_LBLE ),SMALL_FONT)+32;
  1106.         short    y;
  1107.         short    autocnt    = 0;
  1108.  
  1109.          CopyFromBACKtoPSEUDObuffer(
  1110.             &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
  1111.             Xposn-52, 243, 20, 195+34);
  1112.          CopyFromBACKtoPSEUDObuffer( &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
  1113.             x, 440,    60, 34 );
  1114.  
  1115.           for ( char s=0; s < 11; s ++ )
  1116.         {
  1117.             plyr    =    SquadInfo[ (Team*20)+s ];
  1118.  
  1119.             if ( EUROgameType == EURO_friendly )
  1120.             {
  1121.  
  1122. //                  for ( char p=0; p < EUROmaxPlayers; p ++ )
  1123.                   for ( char p=0; p < EUROnoOfMatchPlyrs; p ++ )
  1124.                 {
  1125.                     if ( (UserList[p].team == Team && 
  1126.                           UserList[p].player == plyr ) &&
  1127.                              (UserList[ EUROplyrSetup ].team == Team &&
  1128.                           UserList[EUROplyrSetup].player == plyr ) )
  1129.                               DisplayString( (Xposn-42)-(PixelLengthOfString( GetTEXT( UTAG_LBLS+p ), SMALL_FONT) ) /2, 
  1130.                                    (242+( s * 18)), ( GetTEXT ( UTAG_LBLS+p )) , 
  1131.                                    SMALL_FONT, 62, NO_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  1132.                 }
  1133.             }
  1134.  
  1135.  
  1136.             if ( ( EUROgameType == EURO_network_game || EUROgameType == EURO_wireplay ) &&
  1137.                 (UserList[0].team == Team && 
  1138.                          ( UserList[0].player == plyr || UserList[0].player==AUTOPLAYER) ))
  1139.             {                         
  1140.                         if ( UserList[0].player == plyr )
  1141.                         y = 241+(s*18);
  1142.                     else
  1143.                         y = 438;                     
  1144.  
  1145.                          DisplayString( (Xposn-37)-(PixelLengthOfString( GetTEXT( UTAG_LBLS+4 ), LARGE_FONT) ) /2, 
  1146.                               y, ( GetTEXT ( UTAG_LBLS+Auto )), 
  1147.                               LARGE_FONT, 62, NO_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  1148.             }
  1149.             }
  1150.  
  1151.  
  1152.  
  1153.  
  1154.             if ( EUROgameType == EURO_friendly )
  1155.             {
  1156. //                  for ( char a=0; a < EUROmaxPlayers; a ++ )
  1157.                   for ( char a=0; a < EUROnoOfMatchPlyrs; a ++ )
  1158.  
  1159.                 {
  1160.                     if    ( UserList[a].team == Team &&
  1161.                         UserList[a].player == AUTOPLAYER )
  1162.                           {
  1163.                   
  1164.                               if ( EUROplyrSetup == a )
  1165.                                          DisplayString( (Xposn-42)-(PixelLengthOfString( GetTEXT( UTAG_LBLS+a ), SMALL_FONT) ) /2, 
  1166.                                              440, ( GetTEXT ( UTAG_LBLS+a )) , 
  1167.                                              SMALL_FONT, 62, NO_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  1168.  
  1169.                               else
  1170.  
  1171.                               {
  1172.                                   x = Xposn+PixelLengthOfString(GetTEXT( AUTO_LBLE ),SMALL_FONT)+32;
  1173.                   
  1174.                                     DrawIMAGE( &FrontendPseudoDEFN, &FrontendTextureDEFN, 
  1175.                                         PLYR_TAGB, x-2+autocnt, 438, NO_BOX, straightcopy );      
  1176.                           
  1177.                                   DisplayString( x+10-((PixelLengthOfString( GetTEXT( UTAG_LBLS+a ), SMALL_FONT) ) /2)+autocnt, 
  1178.                                        440, ( GetTEXT ( UTAG_LBLS+a )) , 
  1179.                                        SMALL_FONT, 55, NO_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  1180.                                   autocnt+=20;
  1181.                               }
  1182.                           }
  1183.                 }
  1184.             }
  1185.  
  1186.  
  1187.  
  1188.             AddToDumpList( Xposn-52, 243, 20, 195+34 );
  1189.             AddToDumpList( x, 440, 60, 34 );
  1190.     }
  1191.  
  1192. //********************************************************************************************************************************
  1193.